package com.linkhub.oms.admin.modules.order.service;

import com.linkhub.oms.admin.modules.order.domain.param.*;
import com.linkhub.oms.admin.modules.order.domain.param.ordersplit.OrderSplitParam;
import com.linkhub.oms.admin.modules.order.domain.param.ordersplit.OrderSplitRestoreParam;
import com.linkhub.oms.admin.modules.order.domain.vo.ManualOrderImportResultVO;
import com.linkhub.oms.admin.modules.order.domain.vo.OrderFulfillmentResultVO;
import com.linkhub.oms.admin.modules.order.domain.vo.OrderTabCountVO;
import com.linkhub.oms.admin.modules.order.domain.vo.SyncOrderVO;
import com.linkhub.oms.admin.modules.order.domain.vo.orderlist.OrderlistVO;
import com.linkhub.oms.common.response.PageDTO;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.Valid;
import java.util.List;

/**
 * @Description:
 * @Author: echo
 * @Date: 2024/3/31 15:26
 * @Version: 1.0
 */
public interface CustomerOrderBizService {

    /**
     * 分页查询订单数据
     *
     * @param orderQueryParam orderQueryParam
     * @return orders
     */
    PageDTO<OrderlistVO> pageCustomerOrders(CustomerOrderQueryParam orderQueryParam);

    /**
     * 手工同步商店订单信息
     *
     * @param userId userId
     * @return count
     */
    SyncOrderVO manualUpdateShopOrders(String userId);

    /**
     * 根据映射规则跑批商店下待匹配订单
     *
     * @param sysShopId sysShopId
     */
    void runPendingMatchOrders(String sysShopId);

    /**
     * 更新订单地址
     *
     * @param addressUpdateParam addressUpdateParam
     */
    void updateOrderAddress(OrderAddressUpdateParam addressUpdateParam);

    /**
     * 更新订单主表信息
     *
     * @param updateParam updateParam
     */
    void updateOrderInfo(OrderInfoUpdateParam updateParam);

    /**
     * 订单拆分
     *
     * @param splitParam splitParam
     */
    void splitOrder(OrderSplitParam splitParam);

    /**
     * 还原拆分订单
     *
     * @param restoreParam restoreParam
     */
    void restoreOrder(OrderSplitRestoreParam restoreParam);

    /**
     * 查询订单数量, 按页签分组
     *
     * @param countQueryParam countQueryParam
     * @return count
     */
    List<OrderTabCountVO> queryOrderCount(CustomerOrderCountQueryParam countQueryParam);

    /**
     * 提交履约
     *
     * @param fulfillmentParam fulfillmentParam
     * @return vo
     */
    OrderFulfillmentResultVO submitOrderFulfillments(OrderFulfillmentParam fulfillmentParam);

    /**
     * 移入待处理
     *
     * @param singleOrderParam singleOrderParam
     */
    void reviveProcess(BaseSingleOrderParam singleOrderParam);

    /**
     * @Author XieYu
     * @Description 重新提交，由库存那边调用
     * @Date 2024/7/18 23:55
     * @Param [userId, skuId, stashName]
     * @return void
     */
    void reSubmit(String userId, String skuId, String stashName);

    void manualCreate( @Valid ManualCreateOrderParam manualCreateOrderParam );

    ManualOrderImportResultVO importManualOrders( String userId, MultipartFile manualOrderExcel );
}
